package com.dailyblue.java.boot.mybatisplus.controller;

import com.dailyblue.java.boot.mybatisplus.service.SchoolService;
import com.dailyblue.java.spring.boot.commons.bean.JsonResult;
import com.dailyblue.java.spring.boot.commons.bean.ResultTool;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/school")
public class SchoolController {
    @Resource
    private SchoolService schoolService;

    @GetMapping
    public JsonResult find() {
        return ResultTool.success(schoolService.findAll());
    }


}
